package astudy.bytecode;

public class ByteCodeSampleClass {

	public static void main(String[] args) {
		
		ByteCodeSampleClass.staticMethod();
		
		new ByteCodeSampleClass().loops();
		
		new String("test").substring(0, 2).length();
		
		if ("" instanceof String) {
			
		}
	}
	
	private void loops() {
		for (int i = 3; i < 10; i ++) {
			branches(i, i+3);
		}
	}
	
	private void branches(int a, int b) {
		
		if (a > 100) {
			System.out.println(a);
		}
		a = 10;
		switch (b) {
		case 0:
			System.out.println("Zero");
			break;
		case 1:
			System.out.println("One");
			break;
		default:
			System.out.println("None");
			break;
		}
	}
	
	private static void staticMethod() {
		
		System.out.println("test static method!");
		int c = 'a';
		System.out.println(c);
	}
}
